<div class="row-content am-cf">
	<div class="row">
		<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
			<div class="widget am-cf">
			<div class="widget-body  am-fr">
					<div class="am-modal-hd">
					下载EXCEL模板
							<a href="/upload/console/templates/DKEDSP.xlsx" download="贷款额度审批表模板">
								<button type="button" onclick="javascript:void;" class="am-btn am-btn-primary">下载</button>
							</a>
					</div>
					<div class="am-modal-hd">
						上传授信额度审批表 
					</div>
					<div class="am-modal-hd">
						<div class="am-u-sm-5 ">
							<input id="upFile" type="file" />
						</div>
					</div>
			</div>
			</div>
		</div>
	</div>

	</div>
	<script th:inline="javascript">
	<![CDATA[
	$(document).ready(function(){
		$('#upFile').fileinput({
			 showUpload : true,
		     showRemove : true,
		     showCaption: true,
		     language : 'zh',
			 uploadUrl: 'import/importSx',
		     allowedFileExtensions : [ 'xlsx', 'xls'],
		     browseClass: "am-btn am-btn-danger am-btn-sm", //按钮样式
		     dropZoneEnabled: false,//是否显示拖拽区域
			 uploadAsync:false,
			 showPreview:false,
			 uploadClass:'btn btn-default uploadBtnColor',
			 browseIcon:'<i class="am-icon-cloud-upload"></i>',
			 removeIcon: '<i class="am-icon-trash"></i>',
			 layoutTemplates:{'footer':''},
		}).on("filebatchuploadsuccess", function(event, data) {
		    if(data.response.code==10000){
		    	layer.msg('上传成功', {
		    		  icon: 1,
		    		  time: 2000 //2秒关闭（如果不配置，默认是3秒）
		    		}); 
		    }else{
		    	layer.open({
            	  title:'上传失败',
            	  type: 1,
            	  skin: 'layui-layer-rim', //加上边框
            	  area: ['768px', '400px'], //宽高
            	  content: '<div class="widget-body am-fr">'+data.response.msg+'</div>'
            	});
		    }
		}); 
	});	
		
		]]>
	</script>